<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="Keywords" content="个人用品|办公器材|家居生活|家电数码|汽车天地|品牌印象|个人页面"/>
        <meta name="Description" content="{$share.caption|html_entity_decode=###}|品购网--你需要的商品信息分享及消费自助网站|首页|个人用品|办公器材|家居生活|家电数码|汽车天地|品牌印象|个人页面"/>
        <title>{$share.caption|html_entity_decode=###}</title>
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
        <link href="__PUBLIC__/css/hangye.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/css/share.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/css/comm.css" rel="stylesheet" type="text/css" />
		<link href="__PUBLIC__/css/panel.css" rel="stylesheet" type="text/css" />
        <link href="__PUBLIC__/css/person.css" rel="stylesheet" type="text/css" />
        <script src="__PUBLIC__/js/jquery.js" type="text/javascript"></script>
        <script src="__PUBLIC__/js/share.js" type="text/javascript"></script>
    </head>
    <body>
		<div class="containner">
        <include file="Index:header"/>
        <!--导航结束-->
        <div id="myshare" style="position:absolute;top:0px;margin:auto;z-index:299"></div>
        <div class="body-center">
            <div class="w_tithead"> <strong>您当前的位置是： </strong>
	            <a href="__APP__">品购网首页</a>
	            <a href="__APP__/Industry/index/id/{$share.industry_id}">{$share.industry_id|getIndustry}</a>
	            <a  href="__APP__/home/Share/shareList/commodity_id/{$share.commodity_id}">分享内容</a>
	            {$share.caption|html_entity_decode=###}
	        </div>

            <div class="share_pic"></div>
            <div class="detail">
                <div class="person_message">
                    <img src="{$user.user_photo|default='__ROOT__/Public/images/user_photo.jpg'}" height="90" width="90" class="headperson">
                    <ul>
                        <li class="blue"><font color="blue">{$user.user_name}</font></li>
                        <li>&nbsp;</li>
                        <li>被 <span class="yellow" id="">{$user.flow_count}</span> 人关注了</li>
                        <li><div id="guanzhu_btn" class="guanzhu_btn" onclick="addFlow();"></div></li>
                    </ul>
                </div>
                <div class="subject">
                    <h3>{$share.caption|html_entity_decode=###}</h3>
                    <div class="sub">
                        <div class="date">发布时间：{$share.time_add|date="Y-m-d",###}</div>
                        <div class="nums">浏览：<span class="yellow">{$share.count_view}</span>次  评分：<span class="yellow">{$share.score|intval}</span>分</div>
                    </div>
                </div>
            </div>
            <div class="sharecontent">
				{$share.content|html_entity_decode=###|stripslashes=###}
            </div>
            <div class="sharecontent">
                <h3><sup><B><U><font color="#AE0000">补充分享：</Font></U></B></sup></h3>
                <volist name="share_added_list" id="share_added">
                    <p>
                        {$share_added.content|stripslashes=###|html_entity_decode=###}
                        <hr width=100%></hr>
                    </p>
                </volist>
            </div>
            <div>
                <div class="adoption" onclick="addFavorites();"></div><div class="adoptionnms">(已采纳 <span id="Favorited" class="yellow" id="">{$share.count_fav}</span> 次)</div>
            </div>
            <div style="clear:both;padding:3px 3px;margin-top:5px;">{$shang}{$xia}</div>
            <div class="impression">
                <span class="red" style="margin-right:80px">看过本内容，是否有您同感的部分？欢迎发表并可参与评分。</span><span style="margin-right:180px">当前有<span class="yellow">{$brand_member_count}</span>位用户发表对该商品的印象</span>
                <span style="width:12%;cursor:pointer;" class="blue" id="moreyingxiang" >
                	<a href="__APP__/BaseBrand/showInfo/id/{$_GET['id']}">查看更多印象>>></a></span>
                <input size="30" id="yinxiangCi">
                <input type="hidden" value="{$share.id}" id="share_id">
                <img id="pulashYinx" style="cursor:pointer;" src="__PUBLIC__/images/publication.gif" align="absmiddle"><span> （请限定在30个汉字之内）</span>
                <div width="100%" class="yinxiangci">
                    <volist name="brand_list" id="brand">
                        <span>{$brand.caption}</span>
                    </volist>
                </div>
                <!--更多印象-->
                <div width="100%" class="yinxiangci" style="display:none" id="more_yinxiang">
                    <volist name="brand_list_more" id="brand1">
                        <span style="color:yellow">{$brand1.caption}</span>
                    </volist>

                </div>
            </div>
            <span class="pinfen">当前该商品的评分为：<span class="yellow" id="fen">{$share.score}</span>分</span>
            <div class="star_div" id="star_div">
              <div><font color="#0088A8">请您为本帖所指商品打分：</font></div>
                <span>评分器：</span>
                <ul class="star">
                    <li score="10" title="杯具"><div>10</div></li>
                    <li score="20" title="杯具"><div>20</div></li>
                    <li score="30" title="杯具"><div>30</div></li>
                    <li score="40" title="杯具"><div>40</div></li>
                    <li score="50" title="杯具"><div>50</div></li>
                    <li score="60" title="良好"><div>60</div></li>
                    <li score="70" title="良好"><div>70</div></li>
                    <li score="80" title="良好"><div>80</div></li>
                    <li score="90" title="完美"><div>90</div></li>
                    <li score="100" title="完美"><div>100</div></li>
                </ul>
                <span>评分：<span class="yellow" id="fen"></span>分</span>
            </div>
            <div class="block"></div>
        </div>
    <include file="Index:bottom" />
    <!--页尾部分-->
	</div>
    </body>
</html>

<script>
    function fabiaoyinxiangci(){
        var value = $.trim($("#yinxiangCi").val());

        if(value.length>30 || value.length<=0){
            alert('发表失败');
            return false;
        }
        var id = $('#share_id').val();
        var url="__APP__/Home/Brand/add"
        $.post(url,
        {
            id:id,
            caption: value
        },
        function(data){

            if(data == 1){
                alert('发表成功');
                $("#star_div").css("display","block");
                y=document.body.clientHeight;
                y=document.body.offsetHeight;
                x=0;
                window.scrollTo(x,y)
            }
            else if(data == 3){
                alert('您已对该分享发表过印象');
            }
            else{
                alert('发表失败');
            }
        }
    );
    }
    function addyinxiangcinum(value){
        value = $.trim(value);
        //alert(value);
        var id = $('#share_id').val();
        var url="__APP__/Home/Brand/addNum"
        $.post(url,
        {
            id:id,
            caption: value
        },
        function(data){

            if(data == 1){
                alert('发表成功');
                $("#star_div").css("display","block");
                y=document.body.clientHeight;
                y=document.body.offsetHeight;
                x=0;
                window.scrollTo(x,y)
            }
            else if(data == 3){
                 alert('您已对该分享发表过印象');
            }
            else{
                alert('发表失败');
            }
        }
    );


    }

    function addScore(score){
        score = $.trim(score);
        //alert(score);
        var id = $('#share_id').val();
        var url="__APP__/Home/Share/addScore"
        $.get(url,
        {
            id:id,
            score: score
        },
        function(data){
            if(data == 1){
                alert('评分成功');
                window.location.reload();
            }
            else{
                alert('评分失败');
            }
        }
    );
    }

    function addFlow(){
        var id = $('#share_id').val();
        var url="__APP__/Home/Share/addFlow"
        $.get(url,
        {
            id:id
        },
        function(data){
            if(data == 1){
                var num = $("#flowed").text();
                num = parseInt(num) +1;
                $("#flowed").text(num);
                alert('关注成功');
            }
            else if(data == 2){
                alert('请不要关注自己');
            }
            else if(data == 3){
                alert('已关注');
            }
            else{
                alert('关注失败');
            }
        }
    );
    }
    function addFavorites(){
        var id = $('#share_id').val();
        var url="__APP__/Home/Share/addFavorites"
        $.get(url,
        {
            id:id
        },
        function(data){
            if(data == 1){
                var num = $("#Favorited").text();
                num = parseInt(num) +1;
                $("#Favorited").text(num);
                alert('采纳成功');
            }
            else if(data == 2){

                alert('请不要采纳自己的分享');
            }
            else if(data == 3){
                alert('已采纳');
            }
            else{
                alert('采纳失败');
            }
        }
    );
    }

    function bindmouseoverheadperson(){
    	var hideDelayTimer = null;
    	var shown = false;
        $(".headperson").mouseover(function(e){
        	if (hideDelayTimer) clearTimeout(hideDelayTimer);
            var userid = {$share.userid};
            if(shown){
            	return;
            }
            else{
            	$.get("__APP__/Home/User/userInfoAjax",
            	{userid:userid},
            	function(date){
            		$("body").append(date);
            		$(".person").css("top",e.pageY);
            		$(".person").css("left",e.pageX);
            	});
            	shown = true;
            }

        });
        $(".headperson").mouseout(function(e){
        	if (hideDelayTimer) clearTimeout(hideDelayTimer);
        	hideDelayTimer = setTimeout(function () {
            var person = $(".person");
            if(!person.get(0) || !person.get(0).parentNode){return;}
            shown = false;
            person.get(0).parentNode.removeChild(person.get(0));
             }, 500);
        });
    }

    $(function(){
    bindStar();
    bindMorYinxiang();
    bindpulashYinx();
    //bindadoptionbtm();
    			bindmouseoverheadperson();
    fangyinxiangci();
});
</script>

